Don't ever invalidate the root window
authorAlexander Larsson <alexl@redhat.com>
Mon, 10 Aug 2009 12:08:37 +0000 (14:08 +0200)
committerAlexander Larsson <alexl@redhat.com>
Mon, 10 Aug 2009 12:13:06 +0000 (14:13 +0200)
This never worked before csw since the root window is never
set as IS_MAPPED, but with the new viewable check (which is
true for the root window) we could erronously queue exposes
on the root window.

This happened unexpectedly in bug 589369, where metacity
got a GraphicsExpose event on the root window due to some
graphics operation, queueing an expose which would be handled
by clearing that area. That is fixed with this commit.

gdk/gdkwindow.c

index 7a000aaed3e3cc7e876da5cd1867d154b29f216a..fc0a2379aeac50d6a6ab453e9a1c19cfbbfcc7fa 100644 (file)
@@ -5135,7 +5135,8 @@ gdk_window_invalidate_maybe_recurse (GdkWindow       *window,
 
   if (private->input_only ||
       !private->viewable ||
-      gdk_region_empty (region))
+      gdk_region_empty (region) ||
+      private->window_type == GDK_WINDOW_ROOT)
     return;
 
   visible_region = gdk_drawable_get_visible_region (window);